import { useUserStore } from "@/stores/useUser"
import instance from "@/utils/request"

interface IAddBannerParams{
    img:string
    alt:string
    link:string
}


export const getBannerList=()=>{
    return instance.get('/banner/list')
}

export function addBanner(params:IAddBannerParams){
    return instance.post('/banner/add',params)
}

export const removeBanner=(bannerid:string)=>
   instance.get('/banner/delete',{
    params:{bannerid},
    headers:{token:useUserStore().token}
   })
